package com.hmy.contract.commons.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author seven.qi 齐胜南
 * @version 1.0
 * @description
 * @date 2023/12/25 10:27
 */
@Getter
@AllArgsConstructor
public enum ContractRevokeTypeEnum {

    SIGN_SUCCESS_REVOKE(11, "签署完成回调"),
    GET_SIGN_URL_REVOKE(12, "签署地址回调"),

    ;

    private final Integer type;

    private final String typeDesc;

    public static String getDescByType(Integer type) {
        for (ContractRevokeTypeEnum contractTypeEnum : ContractRevokeTypeEnum.values()) {
            if (contractTypeEnum.getType().intValue() == type) {
                return contractTypeEnum.getTypeDesc();
            }
        }
        return null;
    }
}
